package com.probox.common.entity.vo.recharge;

import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.probox.common.core.annotation.Excel;
import com.probox.common.core.enums.*;
import com.probox.common.core.utils.DateUtils;
import com.probox.common.core.utils.money.MoneyUtils;
import com.probox.common.core.utils.money.PriceFormatUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
public class RechargeVo {


    /** 充值单号 */
    @Excel(name = "充值单号")
    @ApiModelProperty(value = "充值单号(充值单号)")
    private String rechargeNo;


    /** 客户名称 */
    @Excel(name = "客户名称")
    @ApiModelProperty(value = "客户名称(客户名称)")
    private String customerName;

    /** 手机号码 */
    //@Excel(name = "手机号码")
    @ApiModelProperty(value = "手机号码(手机号码)")
    private String phone;

    /** 订单状态 1:有效 0:未支付取消 -1:过期未支付无效 -2:已支付取消 */
    //@Excel(name = "订单状态 1:有效/其他:无效")
    @ApiModelProperty(value = "订单状态 1:有效 0:未支付取消 -1:过期未支付无效 -2:已支付取消")
    private String orderStatus;
    @Excel(name = "订单状态")
    private String orderStatusStr;

    public String getOrderStatusStr(){
        orderStatusStr = OrderStatusEnum.getNameByKey(orderStatus);
        return orderStatusStr;
    }

    /** 支付状态 0 未支付/1已支付 */
    //@Excel(name = "支付状态 0 未支付/1已支付")
    @ApiModelProperty(value = "支付状态 0 未支付/1已支付(支付状态 0 未支付/1已支付)")
    private String payStatus;
    @Excel(name = "支付状态")
    private String payStatusStr;
    public String getPayStatusStr(){
        payStatusStr = PayStatusEnum.getNameByKey(payStatus);
        return payStatusStr;
    }

    /** 支付方式 wechat(微信)/alipay(支付宝)/netbank(网银) */

    @ApiModelProperty(value = "支付方式 wechat(微信)/alipay(支付宝)/netbank(网银) )")
    private String payMethod;
    @Excel(name = "支付方式")
    private String payMethodStr;
    public String getPayMethodStr(){
        payMethodStr = PayMethodEnum.getNameByKey(payMethod);
        return payMethodStr;
    }

    /** 订单来源(wechat小程序/H5/Web/Android/IOS) */
    //@Excel(name = "订单来源(wechat小程序/H5/Web/Android/IOS)")
    @ApiModelProperty(value = "订单来源(wechat小程序/H5/Web/Android/IOS) ")
    private String platSource;
    @Excel(name = "订单来源")
    private String platSourceStr;
    public String getPlatSourceStr(){
        platSourceStr = PlatSourceEnum.getNameByKey(platSource);
        return platSourceStr;
    }

    /** 订单金额 */
    //
    @ApiModelProperty(value = "订单金额(订单金额)")
    private Long orderAmount;


    /** 支付金额 */
    //@Excel(name = "支付金额")
    @ApiModelProperty(value = "支付金额(支付金额)")
    private Long payAmount;
    @Excel(name = "订单金额")
    private String orderAmountStr;
    public String getOrderAmountStr(){
        orderAmountStr = PriceFormatUtil.format(orderAmount);
        return orderAmountStr;
    }
    @Excel(name = "支付金额")
    private String payAmountStr;
    public String getPayAmountStr(){
        payAmountStr = PriceFormatUtil.format(payAmount);
        return payAmountStr;
    }


    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "支付时间" , width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "支付时间(支付时间)")
    private Date payTime;



    private String payTimeStr;
    public String getPayTimeStr(){
        payTimeStr = DateUtils.formate(payTime);
        return payTimeStr;
    }


    @Excel(name = "门店")
    @TableField(exist = false)
    private String storeName;


}
